<?php

namespace App\Admin\Exports\Sheet;

use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
use App\Models\LearnWord\LearnWord;
class LearnWordSheet implements FromCollection, WithHeadings, WithTitle
{
    public function collection()
    {
        return LearnWord::query()->select([
            'id', 'grade_id', 'click_learn_id'
        ])->get();
    }

    public function headings(): array
    {
        return [
            '背单词编号', '年级编号', '内容/资源编号'
        ];
    }
    public function title(): string
    {
        return '背单词';
    }
}
